package com.bluetooth.xunxun.util;


import android.content.Context;
import android.widget.ArrayAdapter;


public class AdapterUtil {
	public static ArrayAdapter<String> getArrayAdapter(String[] flag, Context con) {
		if(flag != null && flag.length > 0) {
			ArrayAdapter<String> ret =  new ArrayAdapter<String>(con, android.R.layout.simple_spinner_item, flag);
			ret.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
			return ret;
		} else {
			return null;
		}
	}
}
